package org.huntaway.kindergarten.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the linkman table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="linkman"
 */

public abstract class BaseLinkman  implements Serializable {

	public static String REF = "Linkman";
	public static String PROP_STUDENT = "Student";
	public static String PROP_PHONE = "Phone";
	public static String PROP_INTRODUCTION = "Introduction";
	public static String PROP_ADDRESS = "Address";
	public static String PROP_T_NAME = "TName";
	public static String PROP_ID = "Id";
	public static String PROP_REMARK = "Remark";


	// constructors
	public BaseLinkman () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseLinkman (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String tName;
	private java.lang.String phone;
	private java.lang.String address;
	private java.lang.String remark;
	private java.lang.String introduction;

	// many to one
	private org.huntaway.kindergarten.po.Student student;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="linkman_id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: t_name
	 */
	public java.lang.String getTName () {
		return tName;
	}

	/**
	 * Set the value related to the column: t_name
	 * @param tName the t_name value
	 */
	public void setTName (java.lang.String tName) {
		this.tName = tName;
	}



	/**
	 * Return the value associated with the column: phone
	 */
	public java.lang.String getPhone () {
		return phone;
	}

	/**
	 * Set the value related to the column: phone
	 * @param phone the phone value
	 */
	public void setPhone (java.lang.String phone) {
		this.phone = phone;
	}



	/**
	 * Return the value associated with the column: address
	 */
	public java.lang.String getAddress () {
		return address;
	}

	/**
	 * Set the value related to the column: address
	 * @param address the address value
	 */
	public void setAddress (java.lang.String address) {
		this.address = address;
	}



	/**
	 * Return the value associated with the column: remark
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: remark
	 * @param remark the remark value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}



	/**
	 * Return the value associated with the column: introduction
	 */
	public java.lang.String getIntroduction () {
		return introduction;
	}

	/**
	 * Set the value related to the column: introduction
	 * @param introduction the introduction value
	 */
	public void setIntroduction (java.lang.String introduction) {
		this.introduction = introduction;
	}



	/**
	 * Return the value associated with the column: student_id
	 */
	public org.huntaway.kindergarten.po.Student getStudent () {
		return student;
	}

	/**
	 * Set the value related to the column: student_id
	 * @param student the student_id value
	 */
	public void setStudent (org.huntaway.kindergarten.po.Student student) {
		this.student = student;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof org.huntaway.kindergarten.po.Linkman)) return false;
		else {
			org.huntaway.kindergarten.po.Linkman linkman = (org.huntaway.kindergarten.po.Linkman) obj;
			if (null == this.getId() || null == linkman.getId()) return false;
			else return (this.getId().equals(linkman.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}